class Solution
{
public:
    string kthDistinct(vector<string> &arr, int k)
    {
        unordered_map<string, int> strCount;
        for (auto &s : arr)
        {
            ++strCount[s];
        }
        int i = 0;
        for (auto &s : arr)
        {
            if (strCount[s] == 1)
            {
                ++i;
                if (i == k)
                {
                    return s;
                }
            }
        }
        return "";
    }
};